﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="query.aspx.cs" Inherits="AnyOffice.general.news.show.query" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>公告通知查询</title>
		
		<link rel="stylesheet" type="text/css" href="/module/date_selector/popcalendar.css">
			<script src="/module/date_selector/popcalendar.js"></script>
			<script src="/aspnet_client/core/function.js"></script>
			<script Language="JavaScript" type="text/javascript">
			function CheckForm()
			{
				if(!checkIsDate(document.Form1.txtSendTimeMIN.value))
				{
					alert("开始日期不正确！");
					document.Form1.txtSendTimeMIN.focus();
					return (false);
				}
				   
				if(!checkIsDate(document.Form1.txtSendTimeMAX.value))
				{
					alert("结束日期不正确！");
					document.Form1.txtSendTimeMAX.focus();
					return (false);
				}
				return (true);
			}

			function open_news(news_id)
			{
//				URL="read_news.aspx?news_id="+news_id;
//				myleft=(screen.availWidth-500)/2;
//				mytop=150
//				mywidth=600;
//				myheight=500;
//				window.open(URL,"read_news","height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");


				var mwidth = "600";
				var mheight = "450";
				var loc_x = parseInt((window.screen.width - mwidth) / 2);
				var loc_y = parseInt((window.screen.height - mwidth) / 2);

				var _oParameter = new Object();
				_oParameter.dialogTitle = "简报查看";
				_oParameter.openFile = "read_news.aspx?news_id=" + news_id + "&num=" + Math.random();

				window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
   
            
            
            }

			function re_news(news_id)
			{
//				URL="re_news.aspx?news_id="+news_id;
//				myleft=(screen.availWidth-500)/2;
//				window.open(URL,"read_news","height=400,width=550,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");


				var mwidth = "600";
				var mheight = "450";
				var loc_x = parseInt((window.screen.width - mwidth) / 2);
				var loc_y = parseInt((window.screen.height - mwidth) / 2);

				var _oParameter = new Object();
				_oParameter.dialogTitle = "简报查看";
				_oParameter.openFile = "re_news.aspx?news_id=" + news_id + "&num=" + Math.random();

				window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
  
   
            
            
            
            }
			</script>

	</HEAD>
	<body class="bodycolor" style="padding-top:0;" topmargin="0">
		<form id="Form1" method="post" runat="server">
         <div class="main_div">
			<table border="0" width="90%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img align="absMiddle" src="/images/menu/infofind.gif" width="20" height="20"><span class="big3">
							<asp:Literal id="litNavTitle" runat="server"></asp:Literal>
						</span>
					</td>
				</tr>
			</table>
			<br>
			<asp:Panel id="pnlMain" runat="server">
				<TABLE class="small" cellSpacing="1" cellPadding="2" width="500" align="center" border="0" bgcolor=#000000>
					<TR>
						<TD class="TableData" noWrap width="100">标题：</TD>
						<TD class="TableData"><INPUT class="BigInput" id="txtSubject" type="text" maxLength="100" size="33" name="txtSubject"
								runat="server">
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>类型：</TD>
						<TD class="TableData"><SELECT class="BigSelect" id="sltTypeId" name="sltTypeId" runat="server" DataValueField="TypeId"
								DataTextField="TypeName"></SELECT>
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>发布人：</TD>
						<TD class="TableData"><INPUT id="UserIds" type="hidden" name="UserIds" runat="server"> <TEXTAREA class="BigStatic" id="UserNames" name="UserNames" rows="3" readOnly wrap="yes" cols="30"
								runat="server"></TEXTAREA> &nbsp;<INPUT class="SmallButton" title="添加人员" onclick="user_select('UserIds','UserNames','');" type="button" value="选 择"
								name="button"> &nbsp;<INPUT class="SmallButton" title="清空人员" onclick="clear_double('UserIds','UserNames');" type="button" value="清 空"
								name="button"></TD>
					</TR>
					</tr>
					<TR>
						<TD class="TableData" noWrap width="100">发布日期：</TD>
						<TD class="TableData"><INPUT class="BigInput" id="txtSendTimeMIN" type="text" maxLength="10" size="12" name="txtSendTimeMIN"
								runat="server"> <IMG style="CURSOR: hand" onclick="popUpCalendar(this,txtSendTimeMIN,'yyyy-mm-dd','');"
								src="/module/date_selector/calendar.gif" align="absMiddle" border="0"> 至&nbsp;
							<INPUT class="BigInput" id="txtSendTimeMAX" type="text" maxLength="10" size="12" name="SendTimeMAX"
								runat="server"> <IMG style="CURSOR: hand" onclick="popUpCalendar(this,txtSendTimeMAX,'yyyy-mm-dd','');"
								src="/module/date_selector/calendar.gif" align="absMiddle" border="0">
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap width="100">内容：</TD>
						<TD class="TableData"><INPUT class="BigInput" id="txtContent" type="text" maxLength="200" size="33" name="txtContent"
								runat="server">
						</TD>
					</TR>
					<TR class="TableControl" align="center">
						<TD noWrap colSpan="2"><INPUT class="BigButton" onclick="return CheckForm();" type="submit" value="查询">&nbsp;&nbsp;
							<INPUT class="BigButton" type="reset" value="重填">&nbsp;&nbsp;
						</TD>
					</TR>
				</TABLE>
			</asp:Panel>
			<asp:Panel id="pnlLater" runat="server" Visible="False">
				<asp:Repeater id="rptNews" runat="server">
					<HeaderTemplate>
						<TABLE class="small" cellSpacing="1" cellPadding="3" width="100%" bgColor="#000000" border="0">
						<tr class="TableHeader">						
								<TD noWrap align="center">标题</TD>
								<TD noWrap align="center">类型</TD>								
								<TD noWrap align="center">发布人</TD>
								<TD noWrap align="center">发布时间</TD>
								<td nowrap align="center">点击次数</td>
								<td nowrap align="center">简报评论</td>						
						</tr>
					</HeaderTemplate>
					<ItemTemplate>
						<tr class="TableLine1">
							<td>
							<a href="javascript:open_news('<%#Eval("NewsId")%>');"><%#Eval("Subject")%></a><%#Eval("Readers") != DBNull.Value ? GetNew(Eval("Readers").ToString()) : "<img src=/images/new.gif align=absmiddle>"%>
							</td>
							<td align="center" nowrap><%#Eval("TypeName")%></td>						
							<td nowrap align="center"><u title="部门：<%#Eval("DeptName")%>" style="CURSOR:hand"><%#Eval("UserName")%></u></td>
							<td noWrap align="center"><%#Eval("SendTime")%></td>
							<td nowrap align="center"><%#Eval("ViewCount")%></td>
							
                            	<td nowrap align="center">
								<a href="edit.aspx?news_id=<%#Eval("NewsId")%>&type_id=<%#Eval("TypeId")%>&page=1">修改</a> <a href="javascript:delete_news('<%#Eval("NewsId")%>','<%=ViewState["CurrentPage"]%>');">
									删除</a> <a href="javascript:re_news('<%#Eval("NewsId")%>');">管理评论</a>
							</td>
						</tr>
					</ItemTemplate>
					<AlternatingItemTemplate>
						<tr class="TableLine2">
							<td>
							<a href="javascript:open_news('<%#Eval("NewsId")%>');"><%#Eval("Subject")%></a><%#Eval("Readers") != DBNull.Value ? GetNew(Eval("Readers").ToString()) : "<img src=/images/new.gif align=absmiddle>"%>
							</td>
							<td align="center" nowrap><%#Eval("TypeName")%></td>
							<td nowrap align="center"><u title="部门：<%#Eval("DeptName")%>" style="CURSOR:hand"><%#Eval("UserName")%></u></td>
							<td noWrap align="center"><%#Eval("SendTime")%></td>
							<td nowrap align="center"><%#Eval("ViewCount")%></td>
							<td nowrap align="center">
								<a href="edit.aspx?news_id=<%#Eval("NewsId")%>&type_id=<%#Eval("TypeId")%>&page=1">修改</a> <a href="javascript:delete_news('<%#Eval("NewsId")%>','<%=ViewState["CurrentPage"]%>');">
									删除</a> <a href="javascript:re_news('<%#Eval("NewsId")%>');">管理评论</a>
							</td>
						</tr>
					</AlternatingItemTemplate>
					<FooterTemplate>
						</TABLE>
					</FooterTemplate>
				</asp:Repeater>
				<asp:Literal id="litMessage" runat="server"></asp:Literal>
				<BR>
				<CENTER><INPUT class="BigButton" onclick="history.back();" type="button" value="返回"></CENTER>
				<BR>
			</asp:Panel>
            </div>
		</form>
	</body>
</HTML>
